import { Navigate, Outlet } from 'react-router-dom';

// 路由守卫组件
function PrivateRoute() {
  const isAuth = !!localStorage.getItem('token'); // 假设用 token 判断登录
  return isAuth ? <Outlet /> : <Navigate to="/login" replace />;
}

export default PrivateRoute;